<form id="addtx-form" name="addtxForm" ng-submit="saveTx()">
    <div class="modal-header">
        <h2>Ajouter une transaction</h2>
    </div>  
    
    <div class="modal-body">   
        <div class="form-group">
            <label for="addtx-date" class="control-label">Date :</label>
            <input type="date" id="addtx-date" class="form-control" ng-model="dialog.transaction.date" required />
        </div>
        <div class="form-group">
            <label for="addtx-amount" class="control-label">Montant :</label>
            <div class="input-group">
                <div class="input-group-addon">€</div>
                <input type="number" id="addtx-amount" class="form-control" min="0" step="any" ng-model="dialog.transaction.amount" required />
            </div>
        </div>
        <div class="form-group">
            <label for="addtx-bank" class="control-label">Banque :</label>
            <select id="addtx-bank" class="form-control" ng-options="account.id as (account.name + ' - ' + account.accountNumber) for account in accounts" 
                ng-model="dialog.transaction.fromAccountId" required>
                <option value="">Selectionnez un compte ...</option>
            </select>
        </div>
        <div class="form-group">
            <label for="addtx-recipient" class="control-label">Vers compte :</label>
            <select id="addtx-recipient" class="form-control" ng-options="recip.id as (recip.name + ' - ' + recip.accountNumber) for recip in recipients" 
                ng-model="dialog.transaction.recipientId" required>
                <option value="">Selectionnez un destinataire ...</option>
            </select>
        </div>
        <div class="form-group">
            <label for="addtx-communication" class="control-label">Communication :</label>
            <input type="text" id="addtx-communication" class="form-control" ng-model="dialog.transaction.communication" />
        </div>
        <div class="form-group">
            <label for="addtx-datecompta" class="control-label">Date compta :</label>
            <input type="date" id="addtx-datecompta" class="form-control" ng-model="dialog.transaction.dateCompta" />
        </div>
    </div>
    
    <div class="modal-footer">
        <button class="btn btn-success">Save</button>
        <a class="btn btn-warning" ng-click="cancel()">Close</a>
    </div>
</form>